import Vue from 'vue'
import VueRouter from 'vue-router'
import login from "@/components/Login";
import home from "@/components/Home";
import manager from "@/components/system/Manager";
import Role from '@/components/system/Role'
import course from '@/components/train/Course'
import implement from '@/components/train/Implement'
import need from '@/components/train/Need'
import trainer from '@/components/train/Trainer'
import permission from "@/components/system/Permission";
import welCome from "@/components/Welcome";
import PersonalCenter from "@/components/system/PersonalCenter";
import recruitRequire from "@/components/recruitment/RecruitRequire";
import recruitChannel from "@/components/recruitment/RecruitChannel";
import employee from "@/components/human/Employee";
import addEmployee from "@/components/human/AddEmployee";
import dimission from "@/components/human/Dimission";
import contract from "@/components/human/Contract";

import probationPeriod from "@/components/human/ProbationPeriod";
import dept from "@/components/department/Dept";
import position from "@/components/department/Position";
import intern from "@/components/human/Intern";
import editEmployee from "@/components/human/EditEmployee";
import security from "@/components/compensation/Security";
import salary from "@/components/salary/Salary";
import attendance from "@/components/attendance/Attendance";
import leave from "@/components/attendance/Leave";
import overTime from "@/components/attendance/OverTime";
import evection from "@/components/attendance/Evection";
import statistical from "@/components/attendance/Statistical";


import total from "@/components/total/Total";


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: login
    },
    {
        path: '/login',
        name: 'login',
        component: login
    },
    {
        path: '/home',
        name: 'home',
        component: home,
        children:[
            {
                path: '/security',
                name: 'security',
                component: security
            },
            {
                path: '/dimission',
                name: 'dimission',
                component: dimission
            },
            {
                path: '/contract',
                name: 'contract',
                component: contract
            },
            {
                path: '/home',
                name: 'welCome',
                component: welCome
            },
            {
                path: '/manager',
                name: 'manager',
                component: manager
            },
            {
                path: '/PersonalCenter',
                name: 'PersonalCenter',
                component: PersonalCenter
            },
            {
                path: '/permission',
                name: 'permission',
                component: permission
            },
            {
                path: '/trainer',
                name: 'trainer',
                component: trainer
            },
            {
                path: '/course',
                name: 'course',
                component: course
            },
            {
                path: '/need',
                name: 'need',
                component: need
            },
            {
                path: '/implement',
                name: 'implement',
                component: implement
            },

            {
                path: '/Role',
                name: 'Role',
                component: Role
            },
            {
                path: '/recruitRequire',
                name: 'recruitRequire',
                component: recruitRequire
            },
            {
                path: '/recruitChannel',
                name: 'recruitChannel',
                component: recruitChannel
            },
            {
                path: '/employee',
                name: 'employee',
                component: employee
            },
            {
                path: '/probationPeriod',
                name: 'probationPeriod',
                component: probationPeriod
            },
            {
                path: '/dept',
                name: 'dept',
                component: dept
            },
            {
                path: '/addEmployee',
                name: 'addEmployee',
                component: addEmployee
            },
            {
                path: '/intern',
                name: 'intern',
                component: intern
            },
            {
                path: '/editEmployee/:emp',
                name: 'editEmployee',
                component: editEmployee
            },
            {
                path: '/salary',
                name: 'salary',
                component: salary
            },
            {
                path: '/attendance',
                name: 'attendance',
                component: attendance
            },
            {
                path: '/leave',
                name: 'leave',
                component: leave
            },
            {
                path: '/overTime',
                name: 'overTime',
                component: overTime
            },
            {
                path: '/evection',
                name: 'evection',
                component: evection
            },
            {
                path: '/statistical',
                name: 'statistical',
                component: statistical
            },
            {
                path: '/position',
                name: 'position',
                component: position
            },
            {
                path: '/total',
                name: 'total',
                component: total
            }


        ]

    },

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
